
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/locale/zh_CN';
import Login from './pages/Login';
import Dashboard from './pages/Dashboard';
import KeywordManagement from './pages/KeywordManagement';
import ContentManagement from './pages/ContentManagement';
import Analytics from './pages/Analytics';
import EnterpriseManagement from './pages/EnterpriseManagement';
import 'antd/dist/reset.css';
import './App.css';

function App() {
  return (
    <ConfigProvider 
      locale={zhCN}
      theme={{
        token: {
          colorPrimary: '#1890ff',
          borderRadius: 6,
        },
      }}
    >
      <Router>
        <Routes>
          <Route path="/login" element={<Login />} />
          <Route path="/dashboard" element={<Dashboard />} />
          <Route path="/keywords" element={<KeywordManagement />} />
          <Route path="/content" element={<ContentManagement />} />
          <Route path="/analytics" element={<Analytics />} />
          <Route path="/enterprise" element={<EnterpriseManagement />} />
          <Route path="/" element={<Navigate to="/login" replace />} />
        </Routes>
      </Router>
    </ConfigProvider>
  );
}

export default App;
